package com.yanjingzheng.entity;

/**
 * @Author Yenchingcheng
 * @Date 2023/9/11 16:29
 * @Description 终端表达式类（判断有无）
 **/
public class TerminalExpression implements Expression {

    private String data;

    public TerminalExpression(String data){
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        if(context.contains(data)){
            return true;
        }
        return false;
    }
}
